//==================================================================
/// printout.cpp
///
/// Created by Davide Pasca - 2009/10/5
/// See the file "license.txt" that comes with this project for
/// copyright info. 
//==================================================================

#include "stdafx.h"
#include "printout.h"

//==================================================================
printout::printout()
{
	_off_x = 6;
	_off_y = 0;

	_list.resize( 64 );
	_list_cnt = 0;

	_c1[0] = 0;
	_c1[1] = 255;
	_c1[2] = 0;
}

//==================================================================
void printout::add( const DStr &line )
{
	if ( _list_cnt >= 64 )
		_list_cnt = 0;

	_list[_list_cnt++] = line;
}

void printout::set_offset( int x, int y )
{
	_off_x = x;
	_off_y = y;
}

void printout::paint( graphics &g )
{
#if 0
	g.setColor( Color.black );
	for (int i=0; i < _list_cnt; ++i)
		g.drawString( _list[i], _off_x + 1, _off_y + (i+1) * 14 + 1 );

	g.setColor( _c1 );
	for (int i=0; i < _list_cnt; ++i)
		g.drawString( _list[i], _off_x, _off_y + (i+1) * 14 );
#endif

	_list_cnt = 0;
}